<!--
  @author heguanghua
  @since 2020/05/11 19:49
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead >
    <tr>
        <th lay-data="{type:'checkbox', width:50, unresize:true, align:'center', fixed:'left'}"></th>
        <th lay-data="{field:'staffId', width:80, unresize:true, align:'center', fixed:'left'}">员工ID</th>
        <!--<th lay-data="{field:'staffName', width:160, unresize:true, align:'center', fixed:'left'}">员工账号</th>-->
        <th lay-data="{field:'realName', width:100, unresize:true, align:'center', fixed:'left'}">员工姓名</th>
        <th lay-data="{field:'companyName',  unresize:true, align:'center'}">合同公司</th>
        <th lay-data="{field:'deptName',  unresize:true, align:'center'}">部门</th>
        <th lay-data="{field:'type',  unresize:true, align:'center'}">员工类型</th>
        <!--<th lay-data="{field:'mobile', width:140, unresize:true, align:'center'}">手机</th>-->
        <!--<th lay-data="{field:'phone', width:140, unresize:true, align:'left'}">电话</th>-->
        <!--<th lay-data="{field:'mail', unresize:true, align:'left'}">邮箱</th>-->
        <th lay-data="{field:'status',  unresize:true, align:'center'}">员工状态</th>
        <th lay-data="{field:'lastLoginTime',  unresize:true, align:'center'}">最近登录时间</th>
        <th lay-data="{field:'操作',  unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td></td>
        <td th:text="${item.staffId}">staffId</td>
        <!--<td th:switch="${hasStaffDetail}">-->
        <!--    <a th:lay-href="|${SYS_MCC}/staff/detail.action?staffId=${item.staffId}|" th:lay-text="员工信息" th:text="${item.staffName}" th:case="true">staffName</a>-->
        <!--    <th:block th:text="${item.staffName}" th:case="*"></th:block>-->
        <!--</td>-->
        <td th:text="${item.realName}">realName</td>
        <td th:text="${item.companyName}">companyName</td>
        <td th:text="${item.deptName == null ? item.positionName:item.deptName}">deptName</td>
        <td th:text="${T(com.zmn.mcc.common.dictionary.StaffDict).getRoleTypeName(item.type * 1)}">type</td>
        <!--<td th:text="${item.mobile}">mobile</td>-->
        <!--<td th:text="${item.phone}">phone</td>-->
        <!--<td th:text="${item.mail}">mail</td>-->
        <td th:text="${T(com.zmn.common.dictionary.GlobalDict).getStatus(item.status * 1)}">status</td>
        <td th:text="${T(com.zmn.common.utils.date.DateUtil).subDate(item.lastLoginTime)}">lastLoginTime</td>
        <td>
            <a th:lay-href="|${SYS_MCC}/staff/detail.action?staffId=${item.staffId}|" class="layui-btn layui-btn-xs layui-btn-primary" th:lay-text="员工信息" th:if="${hasStaffDetail}">员工详情</a>
        </td>
    </tr>
    </tbody>
</table>
